export interface GetUserListApiParams {
  page: number;
  limit: number;
  username: string;
}

/*
  "records": [
      {
        "id": 28,
        "createTime": "2022-08-30 07:57:31",
        "updateTime": "2022-08-30 07:57:31",
        "username": "111",
        "password": "698d51a19d8a121ce581499d7b701668",
        "name": "111",
        "phone": null,
        "roleName": ""
      }
    ],
    "total": 12,
*/

export interface UserItem {
  id?: number;
  gmtCreate?: string;
  gmtModified?: string;
  username: string; // 用户名
  nickName: string; // 用户昵称
  password: string; // 用户密码
  roleName?: string; // 角色名称
}

export type UserList = UserItem[];

export interface GetUserListApiResponse {
  items: UserList;
  total: number;
}

export interface RoleItem {
  id: number;
  roleName: string;
}

export type RoleList = RoleItem[];

export interface GetUserRoleResponse {
  // 已经安排的角色列表
  assignRoles: RoleList;
  // 所有角色列表
  allRolesList: RoleList;
}
